@import '~components/constants.scss';

.drive_viewer {
  background: $white;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;

  &.inline {
    flex: 1;
    position: absolute;
  }

  .open-with {
    width: auto;
    margin: 0px;
    margin-left: 15px;
    position: relative;
    margin-top: -5px;
    vertical-align: top;
  }

  .no_preview_text,
  .loading_preview_text {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 40px;
    width: 200px;
    text-align: center;
    font-size: 16px;
  }

  .view_header {
    height: 70px;
    border-bottom: 1px solid $grey_light;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    line-height: 22px;

    .title {
      font-size: 16px;
      display: inline-block;
    }

    .close,
    .download {
      height: 24px;
      width: 24px;
      display: inline-block;
      float: right;
      position: relative;
      margin-left: 20px;
      cursor: pointer;
      &:hover {
        opacity: 0.5;
      }
    }

    .download {
      opacity: 0.8;
    }
  }

  .view_body {
    flex: 1;
    width: 100%;
    background: $grey_background;
    position: relative;

    iframe,
    webview {
      width: 100%;
      height: 100%;
      border: 0;
      position: absolute;
      top: 0;
      left: 0;
    }
  }
}
